<head>
<meta http-equiv="Content-Language" content="en-us">
<link href="Calendar/CalendarControl.css"
      rel="stylesheet" type="text/css">

<link href="css/khiet.css" rel="stylesheet" type="text/css" />

<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/script_thinhnc.js"></script>

<script type="text/javascript">	  
		function checkUserName(usercheck)
		{
			$('#usercheck').html('<img src="images/ajax-loader.gif" />');
			$.post("checkuser.php", {user_name: usercheck} , function(data)
				{			
					   if (data != '' || data != undefined || data != null) 
					   {				   
						  $('#usercheck').html(data);	
					   }
				  });
		}	  
 
		function checkEmail(emailcheck)
		{
			$('#emailcheck').html('<img src="images/ajax-loader.gif" />');
			$.post("checkemail.php", {user_name: emailcheck} , function(data)
				{			
					   if (data != '' || data != undefined || data != null) 
					   {				   
						  $('#emailcheck').html(data);	
					   }
				  });
		}
</script>
<script src="Calendar/CalendarControl.js"language="javascript"></script>
<script type="text/javascript" charset="iso-8859-1">
			function validate_form(form) {
			var f_phone = form.f_phone.value;
		}
		</script>
</head>
<body>
<form  action="add_phieuthu_action.php" id="form1" name="form1" enctype="multipart/form-data" onsubmit="return validate_form(this);" method="POST">
	<input type="hidden" name="ajaxSwitcher" value="1" />
	<table border="0" style="border-collapse: collapse" width="651" id="table1" bgcolor="#D5E4FD">
		<tr>
			<td width="645" colspan="6" bgcolor="#C6D3FE">Thông tin học sinh</td>
		</tr>
		<tr>
			<td width="87">Mã học viên</td>
			<td width="110">
				<input type="text" name="f_mahocvien" class="required" size="16"></td>
			<td width="79">Họ và tên</td>
			<td width="123">
				<input type="text" name="f_hovaten"  class="required"size="16"></td>
			<td width="68">Giới tính</td>
			<td width="146">
				<select size="1" name="f_gioitinh"  class="required">
					<option value="0">Nam</option>
					<option value="1">Nữ</option>
				</select>
			</td>
		</tr>
		<tr>
			<td width="87" >Ngày sinh</td>
			<td width="110">
				<input type="text"  onfocus="showCalendarControl(this);"  name="f_ngaysinh" size="16"></td>
			<td width="79">Phone</td>
			<td width="123">
				<input type="text" name="f_phone" onblur="if(this.value!='')checkUserName(this.value);"  class="required" size="16">
				<span id="usercheck" style="padding-left:10px; ; vertical-align: middle;"></span>
			</td>

			<td width="68">Nghe nghiep</td>
			<td width="146">
				<select size="1" name="f_nghenghiep"  class="required">
					<option value="0">Sinh Vien</option>
					<option value="1">Ke Toan</option>
					<option value="2">Chu Doanh Nghiep</option>
					<option value="3">Dac Biet</option>
				</select>
			</td>
		</tr>
		<tr>
			<td width="645" colspan="6" bgcolor="#C6D3FE">Thông tin lớp đang học</td>
		</tr>
		<tr>
			<td width="87">Loại hình</td>
			<td width="110">
				<input type="text" name="f_loaihinh"  class="required" size="16"></td>
			<td width="79">Khoa</td>
			<td width="123">
				<select size="1" name="f_khoa" onchange="doenable2(this.value); if(this.selectedIndex==1){toggleAjax(0);loadGVFull();} else toggleAjax(1);">
					<option value="1" selected>T&#7841;i nhà</option>
					<option value="2">T&#7853;p trung</option>
					<option value="3">H&#7885;c tr&#7921;c tuy&#7871;n</option>
					<option value="4">Dịch vụ nhân sự</option>
				</select>
			</td>
			<td width="68">Lớp</td>
			<td width="146">
				<select size="1" name="f_lop">{lop}</select>
			</td>
		</tr>
		<tr>
			<td width="87">Ngày bắt đầu học</td>
			<td width="110">
				<input type="text" name="f_ngaybatdau" onfocus="showCalendarControl(this);"   class="required date" size="16" onblur="timGiaoVien()" />
				</td>
			<td width="79">Thời khóa biểu</td>
			<td width="123">
				
				<select name="f_tkb" class="required" onchange="timGiaoVien()">
					<option value="-1">Chọn TKB</option>
					<option value="1">2-4-6</option>
					<option value="2">3-5-7</option>
					<option value="3">T7-CN</option>
					<option value="4">CN</option>
					<option value="0">Cả tuần</option>
				</select>
				</td>
			<td width="68">Ca</td>
			<td width="146">
				<select name="f_ca" class="required" onchange="showGioHoc(this.options[this.selectedIndex].value);timGiaoVien();">
					<option value="-1">Chọn ca học</option>
					<option value="1">Sáng</option>
					<option value="2">Chiều</option>
					<option value="3">Tối</option>
					<option value="0">Khác</option>
				</select>
				</td>
		</tr>
		<tr>
			<td width="87">Số buổi học</td>
			<td width="110"><input type="text" name="f_sobuoi"  class="required" size="16" onblur="timGiaoVien(); tinhNgayKetThuc();">
				</td>
			<td width="79"></td>
			<td width="123"><input type="text" name="f_ngayketthuc" value="" /></td>				
			<td width="68"></td>
			<td width="146"><div id="showgiohoc"></div></td>
		</tr>
		<tr>
			<td width="645" colspan="6" bgcolor="#C6D3FE">Thông tin lớp học đăng ký ban đầu</td>
		</tr>
		<tr>
			<td width="87">Số nhà</td>
			<td width="110">
				<input type="text" name="f_sonha"  size="16"></td>
			<td width="79">Phường/Xã</td>
			<td width="123">
				<input type="text" name="f_phuong"  size="16"></td>
			<td width="68">Quận/Huyện</td>
			<td width="146">
				<input type="text" name="f_quan"   size="16"></td>
		</tr>
		<tr>
			<td width="87">TP/Tỉnh</td>
			<td width="110">
				<input type="text" name="f_tp" size="16"></td>
			<td width="79">Email</td>
			<td width="123">
				<input type="text" name="f_mail" onblur="checkEmail(this.value)" size="16">
				<span id="emailcheck" style="padding-left:10px; ; vertical-align: middle;"></span>
				Mail dạng abc@abc
			</td>
			<td width="68"></td>
			<td width="146"></td>
		</tr>
		<tr>
			<td width="645" colspan="6" bgcolor="#C6D3FE">Thông tin phiếu</td>
		</tr>
		<tr>
			<td width="645" colspan="6">
				<div style="float:left">Giảng viên</div>
				<div id="timgv" style="float:left">
					<select disabled><option>Chọn giáo viên</option></select> <!--{ giangvien}-->
				</div>
				&nbsp;Mã số người tạo
				<input type="text" name="f_nguoitao" value='{nguoitao}' size="16" >
				<br>
				Trạng thái
				<select size="1" name="f_trangthai" onchange="doenable(this.value)">
					<option value="1">&#272;ã thanh toán</option>
					<option value="2" selected>Khách hàng đã đặt cọc</option>
					<option value="3">Khách hàng ti&#7873;m n&#259;ng</option>
					<option value="4">H&#7911;y</option>
				</select>
				<p>
					Mức HP
					<input type="text" name="f_muchp"  class="required number" size="10">
					Tiền học phí
					<input type="text" name="f_tienhp" onchange="changett(this.value);thucthu();" size="10">
					Tiền giảm thu
					<input type="text" name="f_tiengt"  onchange="thucthu();" size="10">
					<p>
						Tiền phụ thu
						<input type="text" name="f_tiencd"  onchange="thucthu();"  size="12">
						Tiền thực thu
						<input type="text" name="f_thucthu" value=0 size="12">
						Lý do giảm thu
						<input type="text" name="f_lydo" size="16">
						<br>
						Hoa hồng
						<input type="text" id="f_hoahong" name="f_hoahong" size="12" value=0 class="required number" ></p>
					<p>
						<label for="file">Filename:</label>
						<input type="file" name="file" id="file" />
						<p>
							Bổ sung thêm
							<textarea rows="7" name="f_dkbd_ca" cols="41"></textarea>
							<br />
							<input type="submit"  value="Thêm dữ" name="Submit1" >
							<input type="reset" value="Làm lại" name="Submit2"></td>
					</tr>
				</table>
				<p align="center">&nbsp;</p>
			</form>
</body>